<template>
    <div style="width: 100%;height: 100%;position: relative">
        <Spin size="large" fix v-if="Loading"></Spin>
        <Form :label-width="180" ref="formValidate" :model="formValidate" id="form"
              :rules="ruleValidate">
            <table>
                <!--<tr>-->
                <!--<td colspan="2">-->
                <!--<Form-item label="审批救助类型:" prop="assistancetype">-->
                <!--<RadioGroup v-model="formValidate.assistancetype">-->
                <!--<Radio label="100" disabled="disabled">城市最低生活保障</Radio>-->
                <!--<Radio label="200" disabled="disabled">城市低收入家庭</Radio>-->
                <!--<Radio label="300" disabled="disabled">非救助对象</Radio>-->
                <!--</RadioGroup>-->
                <!--</Form-item>-->
                <!--</td>-->
                <!--</tr>-->
                <tr>
                    <td>
                        <Form-item label="办理人:" prop="opusername">
                            <Input v-model="formValidate.opusername" placeholder=""
                                   style="width: 200px" disabled="disabled"/>
                        </Form-item>
                    </td>
                    <td>
                        <Form-item label="办理时间:" prop="optime">
                            <DatePicker type="date" v-model="formValidate.optime"
                                        style="width: 200px" disabled="disabled"  :editable="false"></DatePicker>
                        </Form-item>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <Form-item label="办理意见说明:" prop="opmemo">
                            <c-text-area v-model="formValidate.opmemo" :max-length="100" :row="3" width="650"
                                         placeholder="请输入办理意见说明"/>
                        </Form-item>
                    </td>

                </tr>
            </table>
        </Form>
    </div>
</template>

<script>
    /**
     * 默认办理
     */
    import {CommonMixin} from '@/views/common/js/CommonMixin'

    export default {
        components: {},
        mixins: [CommonMixin],
        name: "handle",
        data() {
            return {
                Loading: false,
                familyInfo: {},
                formValidate: {},
                disabled: true,
                information: "",
                key: "",
                ruleValidate: {
                    opusername: [
                        {required: true, message: '办理人不能为空!', trigger: 'blur',}
                    ],
                    optime: [
                        {required: true, message: '办理时间不能为空!', trigger: 'blur', type: "date"}
                    ],
                    opmemo: [
                        {required: true, message: '办理意见说明不能为空!', trigger: 'blur',}
                    ],
                }
            }
        },
        methods: {
            check() {
                var infor = false;
                this.$refs['formValidate'].validate((valid) => {
                    if (valid) {
                        infor = this.formValidate;
                    }
                })
                return infor;
            }
        },
        mounted() {
            Promise.all([
                new Promise((resolve, reject) => {
                    this.getUserInfor(resolve);
                }),
                new Promise((resolve, reject) => {
                    this.getServerTime(resolve);
                }),
            ]).then(res => {
                var date = this.DateFormat(res[1], 'YYYY-MM-DD');
                this.$set(this.formValidate, "opusername", res[0].name);
                this.$set(this.formValidate, "optime", date);
            })

        }
    }
</script>

<style scoped src="../../../common/css/rightTip.css">


</style>
